import React from "react";
import css from './Mask.less'

type P = {
    close?: () => void;
    show: boolean;
    styles?: React.CSSProperties;
}

type S = {}

export default class Mask extends React.Component<P, S> {
    render() {
        const { show, close } = this.props
        return (
            <div
                onClick={close}
                style={show ? this.props.styles : { display: "none" }}
                className={css.mask_max}
            >
                {/* 单个插槽 */}
                {this.props.children}
            </div>
        )
    }
}